/**
* @Author: Zhengfeng.Yao
* @Date:   2017-01-23 14:12:23
* @Last modified by:   Zhengfeng.Yao
* @Last modified time: 2017-02-09 14:48:42
*/

export default class TypeModel {
  typeMap;

  constructor(typeMap) {
    this.typeMap = typeMap || {};
  }

  toArray() {
    return Object.keys(this.typeMap).map(key => ({key, display: this.typeMap[key]}));
  }

  toMap() {
    return this.typeMap;
  }
}
